<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp"%>
<html>
<head>
    <meta charset="utf-8" />
    <title>厅干部平时考核管理系统</title>
    <!--滚动条-->
    <script type="text/javascript" src="<c:url value='/resource/jxkh/js/zUI.js'/>" ></script>
    <style type="text/css">
        .layui-layer-title{border-bottom: 0!important;}
    </style>
    <!--滚动条结束-->
    <script>
        $(function(){
            $("#njga_lf_ul_w").panel({iWheelStep:32});
            if("${issign}"=="0"){
                sign(1);
                var open = layer.open({
                    type: 1, //0（信息框，默认）1（页面层）2（iframe层）3（加载层）4（tips层）。
                    shift: 1, //动画    0-6     css3动画
                    closeBtn:1, //关闭按钮  0 不显示  style  1和2  标题为 false 2
                    title: ['', 'background:#fff;color:#fff;'],
                    area: ['240px', '280px'], //宽高
                    content: $("#qdcg_pop") //iframe层-禁滚动条  $("#photosDemo").html()   'http://www.baidu.com/'
                });

            }

        });
        function exitSys() {
            window.location.href = "<c:url value='/profile/exit.html'/>";
        }
        function pageSwitch(url) {
            document.getElementById("ifrm_data").src = url;
        }
        $(function () {
            //验证当前登陆人没有超级管理员，指挥长，处级干部的权限，那么他肯定是只有普通民警的角色了
            if ('${isadmin}' == '0' && '${iscjgb}' == '0' && '${iszhz}' == '0') {
                pageSwitch('<c:url value='/jump/index1.html'/>');
            } else {
                pageSwitch('<c:url value='/profile/index.html'/>');
            }
        });
    </script>
</head>

<body>
<div class="qdcg_pop" id="qdcg_pop">
    <img src="<c:url value='/resource/jxkh/images/success.png'/>" />
    <p>&nbsp;签到成功！</p>
</div>
<div class="njga">
    <!--lf-->
    <div class="njga_lf">
        <div class="njga_lf_top">
        </div>
        <div class="head">
            <img src="data:image/png;base64,${_SESSION_LOGIN_USER.photo}"/>
        </div>
        <div class="name">${_SESSION_LOGIN_USER.name}</div>
        <div class="zc_row">
            <div class="zc_row_lf">${_SESSION_LOGIN_USER.deptName}</div>
            <div class="zc_row_ct"></div>
            <div class="zc_row_lf">${_SESSION_LOGIN_USER.dutyName}</div>
        </div>
        <div class="njga_lf_ul_w" id="njga_lf_ul_w">
            <div>
                <ul class="njga_lf_ul">
                    <li>
                        <div class="li_row li_row_hov">
                            <c:choose>
                            <c:when test="${ismj==1}">
                            <a href="javascript:pageSwitch('<c:url value='/jump/index1.html'/>')" class="a_hov">
                                </c:when>
                                <c:otherwise>
                                <a href="javascript:pageSwitch('<c:url value='/profile/index.html'/>')" class="a_hov">
                                    </c:otherwise>
                                    </c:choose>
                                    <div class="li_lf li_lf1"></div>
                                    <div class="li_rt">首页</div>
                                </a>
                        </div>
                    </li>

                    <li>
                        <div class="li_row">
                            <div class="li_lf li_lf2"></div>
                            <div class="li_rt">工作纪实</div>
                            <div class="li_rt_arrow"></div>
                        </div>
                        <div class="li_xl">
                            <c:if test="${ iszhz!=1 }">
                                <a href="javascript:pageSwitch('<c:url value='/jump/wdgz_rz.html'/>')">每日工作记录</a>
                                <a href="javascript:pageSwitch('<c:url value='/worklog/wdzb.html?type=1'/>')">每周工作纪实</a>
                                <a href="javascript:pageSwitch('<c:url value='/worklog/wdyb.html?type=1'/>')">每月工作小结</a>
                            </c:if>
                            <c:if test="${iszhz==1 }">
                                <a href="javascript:pageSwitch('<c:url value='/jump/wdgz_rz.html'/>')">每日工作记录</a>
                                <a href="javascript:pageSwitch('<c:url value='/worklog/wdzb.html?type=2'/>')">每月工作纪实</a>
                                <a href="javascript:pageSwitch('<c:url value='/worklog/wdyb.html?type=2'/>')">每季工作小结</a>
                            </c:if>
                        </div>
                    </li>
                    <li>
                        <div class="li_row">
                            <div class="li_lf li_lf6"></div>
                            <div class="li_rt">考勤管理</div>
                            <div class="li_rt_arrow"></div>
                        </div>
                        <div class="li_xl">
                            <c:if test="${ismj==1 || isadmin==1 }">
                                <a href="javascript:pageSwitch('<c:url value='/jump/wdkq.html'/>')">我的考勤</a>
                            </c:if>
                            <c:if test="${isadmin==1 }">
                                <a href="javascript:pageSwitch('<c:url value='/jump/mjsjdj.html'/>')">门禁数据对接</a>
                            </c:if>
                        </div>
                    </li>

                    <li>
                        <div class="li_row">
                            <div class="li_lf li_lf3"></div>
                            <div class="li_rt">考核评鉴</div>
                            <div class="li_rt_arrow"></div>
                        </div>
                        <div class="li_xl">
                            <a href="javascript:pageSwitch('<c:url value='/evaluation/wdzp.html'/>')">我的自评</a>
                            <c:if test="${ismj!=1 }">
                                <a href="javascript:pageSwitch('<c:url value='/evaluation/ldpj_list/0.html'/>')">领导评鉴</a>
                            </c:if>
                            <%-- <c:if test="${iszhz==1 }">
                                 <a href="javascript:pageSwitch('<c:url value='/evaluation/ldpj_list/0.html'/>')">考核确认</a>
                             </c:if>--%>
                        </div>
                    </li>

                    <li>
                        <div class="li_row">
                            <div class="li_lf li_lf3"></div>
                            <div class="li_rt">考核测评</div>
                            <div class="li_rt_arrow"></div>
                        </div>
                        <div class="li_xl">
                            <a href="javascript:pageSwitch('<c:url value='/jump/bncp.html'/>')">半年测评</a>
                            <a href="#">年度测评</a>
                        </div>
                    </li>

                    <li>
                        <div class="li_row">
                            <div class="li_lf li_lf4"></div>
                            <div class="li_rt">统计分析</div>
                            <div class="li_rt_arrow"></div>
                        </div>
                        <div class="li_xl">
                            <a href="javascript:pageSwitch('<c:url value='/jump/grndcjzs.html'/>')">个人年度成绩走势</a>
                            <c:if test="${isadmin==1||iscjgb==1||iszhz==1}">
                                <a href="javascript:pageSwitch('<c:url value='/jump/ndkhtj.html'/>')">年度考核统计</a>
                                <a href="javascript:pageSwitch('<c:url value='/jump/grndcjzs1.html'/>')">研判分析</a>
                                <%--<a href="javascript:pageSwitch('<c:url value='/jump/dbfx.html'/>')">对比分析</a>--%>
                            </c:if>
                        </div>
                    </li>

                    <c:if test="${isadmin==1 }">
                        <li>
                            <div class="li_row">
                                <div class="li_lf li_lf5"></div>
                                <div class="li_rt">通知通报</div>
                                <div class="li_rt_arrow"></div>
                            </div>
                            <div class="li_xl">
                                <a href="#">通知通报</a>
                            </div>
                        </li>
                    </c:if>

                    <c:if test="${isadmin==1 }">

                        <li>
                            <div class="li_row">
                                <div class="li_lf li_lf6"></div>
                                <div class="li_rt">系统管理</div>
                                <div class="li_rt_arrow"></div>
                            </div>
                            <div class="li_xl">
                                <a href="javascript:pageSwitch('<c:url value='/jump/bmgl.html'/>')">部门管理</a>
                                <a href="javascript:pageSwitch('<c:url value='/jump/rygl.html'/>')">人员管理</a>
                                <a href="javascript:pageSwitch('<c:url value='/task/relation/khrygxsz.html?taskId=-1'/>')">考核人员关系设置</a>
                                <a href="javascript:pageSwitch('<c:url value='/jump/jspz.html'/>')">角色管理</a>
                                <a href="javascript:pageSwitch('<c:url value='/jump/zygl.html'/>')">软件模块注册</a>
                            </div>
                        </li>
                        <li>
                            <div class="li_row">
                                <div class="li_lf li_lf6"></div>
                                <div class="li_rt">考核配置管理</div>
                                <div class="li_rt_arrow"></div>
                            </div>
                            <div class="li_xl">
                                <a href="javascript:pageSwitch('<c:url value='/jump/khysz.html'/>')">考核域管理</a>
                                <a href="javascript:pageSwitch('<c:url value='/khlx/khlxsz.html'/>')">考核类别管理</a>
                                <a href="javascript:pageSwitch('<c:url value='/khmc/khmcsz.html'/>')">考核名称管理</a>
                                <%--<a href="javascript:pageSwitch('<c:url value='/jump/khfzpz.html'/>')">考核方案配置</a>--%>
                                <a href="javascript:pageSwitch('<c:url value='/jump/khrwck.html'/>')">考核任务管理</a>
                                <a href="javascript:pageSwitch('<c:url value='/jump/fzhzsz.html'/>')">分值汇总设置</a>
                            </div>
                        </li>
                        <li>
                            <div class="li_row">
                                <div class="li_lf li_lf6"></div>
                                <div class="li_rt">日志管理</div>
                                <div class="li_rt_arrow"></div>
                            </div>
                            <div class="li_xl">
                                <a href="javascript:pageSwitch('<c:url value='/jump/dlrz.html'/>')">登录日志</a>
                                <a href="javascript:pageSwitch('<c:url value='/jump/czrz.html'/>')">操作日志</a>
                            </div>
                        </li>
                    </c:if>
                </ul>
            </div>
        </div>
    </div>
    <!--rt-->
    <div class="njga_rt">
        <div class="njga_rt_main" id="njga_rt_main">
            <!--rt_top-->
            <div class="njga_top">
                <div class="logo">
                    <img src="<c:url value='/resource/jxkh/images/logo.png'/>"/>
                </div>
                <%-- <div class="njga_top_rt">
                     <div class="block block1">
                         <div class="block_icon"></div>
                         <c:if test="${issign==0}">
                             <div class="p_text">未签到</div>
                         </c:if>
                         <c:if test="${issign==1}">
                             <div class="p_text">已签到</div>
                         </c:if>
                         <c:if test="${issign==2}">
                             <div class="p_text">已签退</div>
                         </c:if>
                     </div>
                     <div class="block block2" onclick="exitSys();">
                         <div class="block_icon"></div>
                         <div class="p_text">退出登录</div>
                     </div>
                 </div>--%>
                <div class="njga_top_rt">
                    <div class="block block2"  onclick="exitSys();" >
                        <div class="block_icon"></div>
                        <div class="p_text">退出登录</div>
                    </div>
                    <c:if test="${iscjgb!=1 && iszhz!=1}">
                        <div class="block block1" id="sign1"
                                <c:if test="${issign!=0}">
                                    style="display: none;"
                                </c:if>
                             onclick="sign(1)">
                            <div class="block_icon block_icon_hov"></div>
                            <div class="p_text">未签到</div>
                        </div>
                        <div class="block block1" id="sign2"
                                <c:if test="${issign!=1}">
                                    style="display: none;"
                                </c:if>
                             onclick="sign(2)">
                            <div class="block_icon"></div>
                            <div class="p_text">未签退</div>
                        </div>
                        <div class="block block1" id="sign3"
                                <c:if test="${issign!=2}">
                                    style="display: none;"
                                </c:if>
                        >
                            <div class="block_icon"></div>
                            <div class="p_text">已签退</div>
                        </div>
                        <div id="timeDiv" class="block block3">
                            <p id="signTime"></p>
                            <div class="youjt"></div>
                        </div>
                    </c:if>
                </div>
            </div>
            <!--rt_bottom-->
            <div class="njga_bottom" id="njga_bottom">
                <iframe id="ifrm_data" name="ifrm_data" scrolling="no"
                        style="width:100%;height:98%;margin:0px;padding:0px;border:0px none;overflow-y:hidden;overflow-x:hidden;"
                        frameborder="0" marginheight="100%"></iframe>
            </div>
        </div>
    </div>


</div>
<script type="text/javascript">
    function getContentSize(id) {
        var h = document.documentElement.clientHeight; //clientHeight内容可视区域的高度
        ch = h + "px";
        njgabottom = (h - 80) + "px";
        njga_lf_ul_wh = (h-238) + "px";
        document.getElementById("njga_rt_main").style.height = ch;
        document.getElementById("njga_bottom").style.height = njgabottom;
       // document.getElementById("njga_bottom").style.height = njgabottom;
        document.getElementById("njga_lf_ul_w").style.height = njga_lf_ul_wh;
    }
    window.onload = getContentSize; //页面加载时调用getContentSize()
    window.onresize = getContentSize; //当改变窗口大小时会出发getContentSize()
    $(document).ready(function () {
        //init
        $("#timeDiv").hide();
        if("${issign}"=="1"){
            $("#timeDiv").show();
            $("#signTime").html("签到时间："+"${signin.signintime}");

        }else if("${issign}"=="2"){
            $("#timeDiv").show();
            $("#signTime").html("签退时间："+"${signin.signouttime}");
        }
        $(".njga_lf_ul .li_row").click(function () {
            $(this).addClass("li_row_hov").next(".li_xl").slideToggle();
            $(this).parent("li").siblings("li").children(".li_row").removeClass("li_row_hov");
            $(this).parent("li").siblings("li").children(".li_xl").slideUp();
            $(".li_xl").children("a").removeClass("a_hov");
        });
        $(".li_xl a").click(function () {
            $(this).addClass("a_hov");
            $(this).siblings("a").removeClass("a_hov");
            $(this).prev(".li_row").removeClass("a_hov");
            $(".li_row").removeClass("li_row_hov");
        });

    })

    function sign(type){
        $.ajax({
            url:"<c:url value='/sign/signin.json'/>",
            type:"post",
            data:{
                type:type
            },
            success:function(data){
                $("#timeDiv").show();

                if(type==1){
                    $("#sign1").css("display","none");
                    $("#sign2").css("display","block");
                    $("#sign3").css("display","none");
                    $("#signTime").html("签到时间："+data.time);
                }else  if(type==2){
                    $("#sign1").css("display","none");
                    $("#sign2").css("display","none");
                    $("#sign3").css("display","block");
                    $("#signTime").html("签退时间："+data.time);
                }
            }
        });
    }
</script>
</body>

</html>